#include "stdafx.h"
#include "N64.h"
#include "Collider.h"

N64::N64(const EEntityType& entity_type) : Entity(entity_type)
{
}


N64::~N64(void)
{
}

void N64::Init(SceneObject* scene_object, Grid* grid)
{
	m_scene_object = scene_object;
}

void N64::Update(float deltatime)
{
	// Update basic tower here
	m_scene_object->m_transform = DirectX::XMMatrixRotationRollPitchYaw(m_rotation.x, m_rotation.y, m_rotation.z) * DirectX::XMMatrixTranslation(m_position.x, m_position.y, m_position.z);

	// Move bounding sphere with entity
	m_scene_object->m_bounding_sphere.m_position.x = m_position.x;
	m_scene_object->m_bounding_sphere.m_position.y = m_position.y;
	m_scene_object->m_bounding_sphere.m_position.z = m_position.z;
	m_collider->Update(m_position);
}